#include <stdio.h>
#include <pthread.h>
#include <curl/curl.h>
#include <unistd.h>
#include <assert.h>
#include <string>
#include <vector>
#include <stdlib.h>
#include <ncurses.h>

struct BlockInfo {
    int num; //number
    FILE *fp; ///file descriptor
    off_t length;///file length
    off_t seek;///current file position
    off_t end;///file block end position
    char *url;///URL
    CURL *curl;
    pthread_t *thread;
    std::vector <struct BlockInfo> *vecptr;
    bool finished;///is job finished?
};


